<script setup lang="ts" name="ImageBar">
import { ImageBarProperty } from './config'

/** 图片展示 */
defineProps<{ property: ImageBarProperty }>()
</script>

<template>
  <!-- 无图片 -->
  <div v-if="!property.imgUrl" class="h-50px flex items-center justify-center bg-gray-3">
    <SvgIcon icon="ep:picture" class="text-gray-8 text-30px!" />
  </div>
  <ElImage v-else class="min-h-30px" :src="property.imgUrl" />
</template>

<style scoped lang="scss">
/* 图片 */
img {
  display: block;
  width: 100%;
  height: 100%;
}
</style>
